<?php
	$blog = new Blog();
	$blog->getArticles();
?>

<?php
	$i=0;
	foreach($blog->artikli as $article) {
		if (!($i++%3)) {
	?>
            <div class="threeCollumns">
	<?php
		} // if end
	?>
                    <div class="smallBox">
                    <div class="najn_vest_drzac">
                        <img class="najn_vest_slika" src="media/vesti/thumbs/<?php echo $article->slika; ?>" />
                        <div class="najn_vest_tekst">
                            <h3 class="najn_vest_naslov"><?php echo $article->naslov; ?></h3>
                            <p class="najn_vest_uvod"><?php echo substr(strip_tags($article->tekst), 0, 300) . "..."; ?>
                            </p>
                        </div>
                    </div>                
                <a href="article/<?php echo $article->id; ?>/<?php echo str_replace(" ", "-", $article->naslov); ?>" class="najn_vest_jos">Read More</a>
                </div>
    <?php if (!($i%3)) {?>
            </div><!-- end of #latest_news -->
    <?php } // end of if2?>
    <?php 
	} // foreach end
     if ($i%3) {?>
            </div><!-- end of #latest_news -->
    <?php } // end of if3
	?>
